/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ru.ipccenter.war;

/**
 *
 * @author Nick
 */
class Check {
    protected  String parameter;
    public enum Result {SUCCESS, NULLNAME, EXISTNAME, EXISTMAIL, NULLPASS, NULLMAIL, INCORRECTMAIL, EMPTY};
    public Check() {

    }
    protected Result check() {
        if (parameter == null) {
            return Result.NULLMAIL;
        }
        if (parameter.equals("")) {
            return Result.EMPTY;
        }
        return Result.SUCCESS;
    }
    protected String getParameter() {
        return parameter;
    }
    protected void setParameter(String newParameter) {
        parameter = newParameter;
    }
}
